Optimal. Leaf size=131 \[ -\frac {c^2 (3 b c-a d)}{2 a^2 b x}-\frac {d^2 (b c-3 a d) x}{2 a b^2}+\frac {(b c-a d) \left (c+d x^2\right )^2}{2 a b x \left (a+b x^2\right )}-\frac {3 (b c-a d)^2 (b c+a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} b^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {479, 584, 211}
\begin {gather*} -\frac {3 \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) (b c-a d)^2 (a d+b c)}{2 a^{5/2} b^{5/2}}-\frac {c^2 (3 b c-a d)}{2 a^2 b x}-\frac {d^2 x (b c-3 a d)}{2 a b^2}+\frac {\left (c+d x^2\right )^2 (b c-a d)}{2 a b x \left (a+b x^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 479
Rule 584
Rubi steps
\begin {align*} \int \frac {\left (c+d x^2\right )^3}{x^2 \left (a+b x^2\right )^2} \, dx &=\frac {(b c-a d) \left (c+d x^2\right )^2}{2 a b x \left (a+b x^2\right )}-\frac {\int \frac {\left (c+d x^2\right ) \left (-c (3 b c-a d)+d (b c-3 a d) x^2\right )}{x^2 \left (a+b x^2\right )} \, dx}{2 a b}\\ &=\frac {(b c-a d) \left (c+d x^2\right )^2}{2 a b x \left (a+b x^2\right )}-\frac {\int \left (\frac {d^2 (b c-3 a d)}{b}+\frac {c^2 (-3 b c+a d)}{a x^2}+\frac {3 (-b c+a d)^2 (b c+a d)}{a b \left (a+b x^2\right )}\right ) \, dx}{2 a b}\\ &=-\frac {c^2 (3 b c-a d)}{2 a^2 b x}-\frac {d^2 (b c-3 a d) x}{2 a b^2}+\frac {(b c-a d) \left (c+d x^2\right )^2}{2 a b x \left (a+b x^2\right )}-\frac {\left (3 (b c-a d)^2 (b c+a d)\right ) \int \frac {1}{a+b x^2} \, dx}{2 a^2 b^2}\\ &=-\frac {c^2 (3 b c-a d)}{2 a^2 b x}-\frac {d^2 (b c-3 a d) x}{2 a b^2}+\frac {(b c-a d) \left (c+d x^2\right )^2}{2 a b x \left (a+b x^2\right )}-\frac {3 (b c-a d)^2 (b c+a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} b^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 94, normalized size = 0.72 \begin {gather*} -\frac {c^3}{a^2 x}+\frac {d^3 x}{b^2}+\frac {(-b c+a d)^3 x}{2 a^2 b^2 \left (a+b x^2\right )}-\frac {3 (-b c+a d)^2 (b c+a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} b^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 129, normalized size = 0.98
method | result | size |
default | \(\frac {d^{3} x}{b^{2}}-\frac {\frac {\left (-\frac {1}{2} a^{3} d^{3}+\frac {3}{2} a^{2} b c \,d^{2}-\frac {3}{2} a \,b^{2} c^{2} d +\frac {1}{2} b^{3} c^{3}\right ) x}{b \,x^{2}+a}+\frac {3 \left (a^{3} d^{3}-a^{2} b c \,d^{2}-a \,b^{2} c^{2} d +b^{3} c^{3}\right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}}}{a^{2} b^{2}}-\frac {c^{3}}{a^{2} x}\) | \(129\) |
risch | \(\frac {d^{3} x}{b^{2}}+\frac {\frac {\left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -3 b^{3} c^{3}\right ) x^{2}}{2 a^{2}}-\frac {b^{2} c^{3}}{a}}{b^{2} x \left (b \,x^{2}+a \right )}-\frac {3 a \ln \left (-\sqrt {-a b}\, x -a \right ) d^{3}}{4 b^{2} \sqrt {-a b}}+\frac {3 \ln \left (-\sqrt {-a b}\, x -a \right ) c \,d^{2}}{4 b \sqrt {-a b}}+\frac {3 \ln \left (-\sqrt {-a b}\, x -a \right ) c^{2} d}{4 \sqrt {-a b}\, a}-\frac {3 b \ln \left (-\sqrt {-a b}\, x -a \right ) c^{3}}{4 \sqrt {-a b}\, a^{2}}+\frac {3 a \ln \left (-\sqrt {-a b}\, x +a \right ) d^{3}}{4 b^{2} \sqrt {-a b}}-\frac {3 \ln \left (-\sqrt {-a b}\, x +a \right ) c \,d^{2}}{4 b \sqrt {-a b}}-\frac {3 \ln \left (-\sqrt {-a b}\, x +a \right ) c^{2} d}{4 \sqrt {-a b}\, a}+\frac {3 b \ln \left (-\sqrt {-a b}\, x +a \right ) c^{3}}{4 \sqrt {-a b}\, a^{2}}\) | \(306\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 140, normalized size = 1.07 \begin {gather*} \frac {d^{3} x}{b^{2}} - \frac {2 \, a b^{2} c^{3} + {\left (3 \, b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} x^{2}}{2 \, {\left (a^{2} b^{3} x^{3} + a^{3} b^{2} x\right )}} - \frac {3 \, {\left (b^{3} c^{3} - a b^{2} c^{2} d - a^{2} b c d^{2} + a^{3} d^{3}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.97, size = 412, normalized size = 3.15 \begin {gather*} \left [\frac {4 \, a^{3} b^{2} d^{3} x^{4} - 4 \, a^{2} b^{3} c^{3} - 6 \, {\left (a b^{4} c^{3} - a^{2} b^{3} c^{2} d + a^{3} b^{2} c d^{2} - a^{4} b d^{3}\right )} x^{2} - 3 \, {\left ({\left (b^{4} c^{3} - a b^{3} c^{2} d - a^{2} b^{2} c d^{2} + a^{3} b d^{3}\right )} x^{3} + {\left (a b^{3} c^{3} - a^{2} b^{2} c^{2} d - a^{3} b c d^{2} + a^{4} d^{3}\right )} x\right )} \sqrt {-a b} \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right )}{4 \, {\left (a^{3} b^{4} x^{3} + a^{4} b^{3} x\right )}}, \frac {2 \, a^{3} b^{2} d^{3} x^{4} - 2 \, a^{2} b^{3} c^{3} - 3 \, {\left (a b^{4} c^{3} - a^{2} b^{3} c^{2} d + a^{3} b^{2} c d^{2} - a^{4} b d^{3}\right )} x^{2} - 3 \, {\left ({\left (b^{4} c^{3} - a b^{3} c^{2} d - a^{2} b^{2} c d^{2} + a^{3} b d^{3}\right )} x^{3} + {\left (a b^{3} c^{3} - a^{2} b^{2} c^{2} d - a^{3} b c d^{2} + a^{4} d^{3}\right )} x\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right )}{2 \, {\left (a^{3} b^{4} x^{3} + a^{4} b^{3} x\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 309 vs.
\(2 (112) = 224\).
time = 0.88, size = 309, normalized size = 2.36 \begin {gather*} \frac {3 \sqrt {- \frac {1}{a^{5} b^{5}}} \left (a d - b c\right )^{2} \left (a d + b c\right ) \log {\left (- \frac {3 a^{3} b^{2} \sqrt {- \frac {1}{a^{5} b^{5}}} \left (a d - b c\right )^{2} \left (a d + b c\right )}{3 a^{3} d^{3} - 3 a^{2} b c d^{2} - 3 a b^{2} c^{2} d + 3 b^{3} c^{3}} + x \right )}}{4} - \frac {3 \sqrt {- \frac {1}{a^{5} b^{5}}} \left (a d - b c\right )^{2} \left (a d + b c\right ) \log {\left (\frac {3 a^{3} b^{2} \sqrt {- \frac {1}{a^{5} b^{5}}} \left (a d - b c\right )^{2} \left (a d + b c\right )}{3 a^{3} d^{3} - 3 a^{2} b c d^{2} - 3 a b^{2} c^{2} d + 3 b^{3} c^{3}} + x \right )}}{4} + \frac {- 2 a b^{2} c^{3} + x^{2} \left (a^{3} d^{3} - 3 a^{2} b c d^{2} + 3 a b^{2} c^{2} d - 3 b^{3} c^{3}\right )}{2 a^{3} b^{2} x + 2 a^{2} b^{3} x^{3}} + \frac {d^{3} x}{b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.62, size = 143, normalized size = 1.09 \begin {gather*} \frac {d^{3} x}{b^{2}} - \frac {3 \, {\left (b^{3} c^{3} - a b^{2} c^{2} d - a^{2} b c d^{2} + a^{3} d^{3}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2} b^{2}} - \frac {3 \, b^{3} c^{3} x^{2} - 3 \, a b^{2} c^{2} d x^{2} + 3 \, a^{2} b c d^{2} x^{2} - a^{3} d^{3} x^{2} + 2 \, a b^{2} c^{3}}{2 \, {\left (b x^{3} + a x\right )} a^{2} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.12, size = 173, normalized size = 1.32 \begin {gather*} \frac {\frac {x^2\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-3\,b^3\,c^3\right )}{2\,a^2}-\frac {b^2\,c^3}{a}}{b^3\,x^3+a\,b^2\,x}+\frac {d^3\,x}{b^2}-\frac {3\,\mathrm {atan}\left (\frac {3\,\sqrt {b}\,x\,\left (a\,d+b\,c\right )\,{\left (a\,d-b\,c\right )}^2}{\sqrt {a}\,\left (3\,a^3\,d^3-3\,a^2\,b\,c\,d^2-3\,a\,b^2\,c^2\,d+3\,b^3\,c^3\right )}\right )\,\left (a\,d+b\,c\right )\,{\left (a\,d-b\,c\right )}^2}{2\,a^{5/2}\,b^{5/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________